<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<!-- <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script> -->
<script src="../script/vue.js"></script>

<style>
    [v-cloak] {
        display: none;
    }
</style>
<body>
    <component id="root">
        
        <div v-text="content"></div>

        <div v-html="content"></div>
        <div v-pre v-cloak>{{name}}</div>

        <div>n的值为{{n}}</div>
        <button @click="n++">点击n+1</button>
        <div v-pre v-once>n的初始值为{{n}}</div>

    </component>

</body>
<script>
    Vue.config.devtools = true

    let vue = new Vue({
        el: '#root',
        data: {
            n: 1,
            content: "<h2>你好，世界</h2>",
            name: '张三',
        },
        methods: {

        }
    });
</script>

</html>